let pathToRegexp = require('path-to-regexp');

// end 表示严格匹配，为false的话就是非严格匹配
let reg = pathToRegexp('/home', [], {end: true});

console.log(reg.test('/home/12341'));

